<template>
  <div class="detail">
    <el-row :gutter="20">
      <el-col :span="8">
        <div class="title">药材名</div>
        <div class="desc">{{form.name}}</div>
      </el-col>
      <el-col :span="8">
        <div class="title">分类名</div>
        <div class="desc" v-if="form.tagList">{{form.tagList[0].name}}</div>
      </el-col>
      <el-col :span="8">
        <div class="title">拼音</div>
        <div class="desc">{{form.pinYin}}</div>
      </el-col>
      <el-col :span="8">
        <div class="title">药典</div>
        <div class="desc">{{form.yaoDian}}</div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="24">
        <div class="title">介绍</div>
        <div class="desc">{{form.jieShao}}</div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="24">
        <div class="title">药性</div>
        <div class="desc">{{form.yaoXing}}</div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="24">
        <div class="title">功效</div>
        <div class="desc">{{form.gongXiao}}</div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <div class="title">用法用量</div>
        <div class="desc">{{form.yongFaYongLiang}}</div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <div class="title">使用注意</div>
        <div class="desc">{{form.zhuYi}}</div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <div class="title">应用</div>
        <div class="desc">{{form.yingYong}}</div>
      </el-col>
    </el-row>
    <div><el-button type="text" @click="goback">返回</el-button></div>
  </div>
</template>

<script>
import { getDetail } from '@/api/zhongyi/yaocai'
//import tag from '@/views/zhongyi/components/yaocaitagtree.vue'
export default {
  // components: { tag },
  props: {
    
  },
  data() {
    return {
      form: {},
      rules: {},
      tagId: null
    }
  },
  mounted() {
    const id = this.$route.params.id
    getDetail(id).then(res=> {
      this.form = res.result
    })
  },
  methods: {
    goback() {
      this.$router.go(-1);
    }
  },
  watch: {
    data: async function () {}
  }
}
</script>

<style lang="scss">
.detail {
    padding: 20px;
   .el-col {
    display: flex;
     .title {
       margin-right: 10px;
       font-weight: bold;
     }
   }
}
</style>


